<weui-items>
  <weui-item *ngFor="let task of values">
    <div weui-start (click)="detail(task)" class="mr-3">
      <div *ngIf="task.status === 'processing'">
        <!-- 未完成的任务用不同颜色图标显示 -->
        <span *ngIf="task?.taskType?.includes('startCheck') && !task?.taskType?.includes('startCheckComplete')">
          <div class="circle-text-creating">{{task?.taskType | processStatus}}</div>
        </span>
        <span *ngIf="task?.taskType?.includes('startCheckComplete') || task?.taskType?.includes('recheck')">
          <div class="circle-text-checking">{{task?.taskType | processStatus}}</div>
        </span>
        <span *ngIf="task?.taskType?.includes('hospitalModify')">
          <div class="circle-text-correcting">{{task?.taskType | processStatus}}</div>
        </span>
      </div>
      <span *ngIf="task.status === 'finished'">
        <!-- 完成的任务统一用绿色图标显示 -->
        <div class="circle-text-finished line-breaker">{{task.status + task?.taskType | processStatus}}</div>
      </span>
    </div>

    <div weui-content (click)="detail(task)">
      <h2>{{task?.riskCheckExecution?.checkTarget?.name}}</h2>
      <p *ngIf="task.checkDetail?.templateItemBased">
        <i class="fa fa-tasks"></i>&nbsp; 排查 : {{task.checkDetail.templateItemBased?.checkSource?.name}}<br>
        <i class="fa fa-cog"></i>&nbsp; 隐患大类 : {{task.checkDetail.templateItemBased?.templateItemName}}
      </p>
      <p *ngIf="task.checkDetail?.deptBased">
        <i class="fa fa-tasks"></i>&nbsp; 排查 : {{task.checkDetail.deptBased.checkSource?.name}}<br>
        <i class="fa fa-window-maximize"></i>&nbsp; 排查部门 : {{task.checkDetail.deptBased?.deptName}}<br>
        <i class="fa fa-cog"></i>&nbsp; 隐患大类 : {{task.checkDetail.deptBased?.templateItemName}}
      </p>
      <p *ngIf="task.checkDetail?.dimensionBased">
        <i class="fa fa-tasks"></i>&nbsp; 排查 : {{task.checkDetail.dimensionBased.checkSource?.name}}<br>
        <i class="fa fa-map-marker"></i>&nbsp; 排查位置 : {{task.checkDetail.dimensionBased.checkTarget}}<br>
        <i class="fa fa-cog"></i>&nbsp; 隐患大类 : {{task.checkDetail.dimensionBased?.templateItemName}}
      </p>
    </div>

    <div weui-last weui-note>
      <p class="text-success"><i class="fa fa-calendar"></i> 开始 :  {{task?.startTime | date: 'yy-MM-dd'}}</p>
      <!--<strong *ngIf="task.checkDetail.dimensionBased" class="text-success"><i class="fa fa-qrcode"> 签到</i></strong>-->
      <p class="text-warning"><i class="fa fa-calendar"></i> 截止 : {{task?.riskCheckExecution?.dueDate | date: 'yy-MM-dd'}}</p>
      <!--初查完成恢复到微信端完成-->
      <weui-button *ngIf="task?.taskType?.includes('startCheckComplete') && task?.status !== 'finished'" mini color="primary" style="margin-left: 30px;" (click)="startCheckComplete(task)">初查完成</weui-button>
    </div>

  </weui-item>
</weui-items>
